const path = require('path')
console.log(process.env.VUE_APP_BASE_URL)
const env = process.env
module.exports = {
  lintOnSave: false,
  devServer: {
    // port: 9898,  //把8080变9876
    proxy: {
      [env.VUE_APP_BASE_API]: {
        target: env.VUE_APP_BASE_URL,
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    },
  },
  css: {
    loaderOptions: {
      sass: {
        additionalData: `@import "@/assets/scss/variables.scss";`,
      },
    },
  },
  configureWebpack: {
    resolve: {
      alias: {
        '@': path.resolve(__dirname, 'src'),
      },
    },
  },
}
